<%@ page language="java" import="java.util.*,com.entity.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>" />
    
    <title>My JSP 'Seachinfo.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache"/>
	<meta http-equiv="cache-control" content="no-cache"/>
	<meta http-equiv="expires" content="0"/>    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
	<meta http-equiv="description" content="This is my page"/>
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script>
function SubmitForm(){

	return true;
}

  function openwindow(str)
{
  window.open("doTree.jsp?sid="+str+"&pd=","部门","height=380,width=260,top=230,left=250,scrollbars=yes"); 
   //showModalDialog("doTree.jsp","部门","height=380,width=260,top=230,left=250,scrollbars=yes");
}

</script>

  </head>
  
  <body onload="loaddw();selectedaddr();"><!-- selectedaddr(); -->
  <%Dlyh dlyh = (Dlyh)request.getSession().getAttribute("dlyh"); 
 if(dlyh.getZd().getTypename().endsWith("市")&&dlyh.getZd().getParentid().equals(745)){
 System.out.println(request.getAttribute("bmmc")+"部门名称");
   if(request.getAttribute("bmmc").equals("s")){
   %>
   <input type="hidden" value="<%=dlyh.getZd().getTypename() %>:<%=dlyh.getZd().getId() %>:<%=dlyh.getZd().getParentid() %>" id="dlyhzd" name="dlyhzd" />
  <%} else if(request.getAttribute("bmmc").equals("x")){%>
    <input type="hidden" value="${dlyhzd.typename }:${dlyhzd.id }:${dlyhzd.parentid }" id="dlyhzd" name="dlyhzd" />
  <%} else if(request.getAttribute("bmmc").equals("xg")){%>
    <input type="hidden" value="${dlyhzd.typename }:${dlyhzd.id }:${dlyhzd.parentid }" id="dlyhzd" name="dlyhzd" />
     <input type="hidden" value="${shiqyid}" id="shiqyid" name="shiqyid" />
  <%} %>
  <input type="hidden" value="${dlyhzd.parentid }" id="qyid" name="qyid" />
  <input type="hidden" value="<%=request.getAttribute("shi") %>" id="shiid" name="shiid" />
  <input type="hidden" value="<%=request.getAttribute("xian") %>" id="xianid" name="xianid" />
  <input type="hidden" value="<%=request.getAttribute("xiang") %>" id="xiangid" name="xiangid" />
  <input type="hidden" value="<%=request.getAttribute("cun")%>" id="cunid" name="cunid" />
  <input type="hidden" value="<%=request.getAttribute("xianzhi") %>" id="xianzhi" name="xianzhi" />
  <%}
  else{
    if((dlyh.getZd().getTypename().endsWith("乡")||dlyh.getZd().getTypename().equals("工业园区")||dlyh.getZd().getTypename().endsWith("镇")||dlyh.getZd().getTypename().endsWith("办")||dlyh.getZd().getTypename().endsWith("办事处")||dlyh.getZd().getTypename().endsWith("局")||dlyh.getZd().getTypename().endsWith("社")||dlyh.getZd().getTypename().endsWith("集团")||dlyh.getZd().getTypename().endsWith("院")||dlyh.getZd().getTypename().equals("民航"))){
   %>
  <input type="hidden" value="<%=request.getSession().getAttribute("shiqyid") %>" id="shiqyid" name="shiqyid" />
  <%}%>
  <input type="hidden" value="<%=dlyh.getZd().getParentid() %>" id="qyid" name="qyid" />
  <input type="hidden" value="<%=dlyh.getZd().getTypename() %>:<%=dlyh.getZd().getId() %>:<%=dlyh.getZd().getParentid() %>" id="dlyhzd" name="dlyhzd" />
  <input type="hidden" value="<%=request.getAttribute("shi") %>" id="shiid" name="shiid" />
  <input type="hidden" value="<%=request.getAttribute("xian") %>" id="xianid" name="xianid" />
  <input type=hidden value="<%=request.getAttribute("xiang") %>" id="xiangid" name="xiangid" />
  <input type="hidden" value="<%=request.getAttribute("cun")%>" id="cunid" name="cunid" />
  <input type="hidden" value="<%=request.getAttribute("xianzhi") %>" id="xianzhi" name="xianzhi" />
  <%} %>
  <script language="javascript" type="text/javascript" src="js/qy1.js"></script>
  <script language="javascript" type="text/javascript" src="My97DatePicker/WdatePicker.js"></script>
  
  <form action="searchList.do?state=searchall" method="post">
  <input type="hidden" value="${bmmc }" id="cs" name="cs">
  <input type="hidden" value="${bmname }" id="sname" name="sname">
  <input type="hidden" id="sid" name="sid" value="0"/>
  <input type="submit" id="s1" name="s1" value="导出Excel" onClick="document.getElementById('sid').value=1" />
  <fieldset style="width: 100%;padding-left: 5%" >
    <legend>查询条件：</legend>
    <table border="1" style="font-size: 12px;" width=98% cellspacing="0" cellpadding="2"  >
    <tbody><tr>
      <td class="TableData" width="100" valign="bottom" >人员编号：</td>
      <td class="TableData" width="100" valign="bottom" >
      	<input name="bh" type="text" id="bh" class="SmallInput" value="${ryzl.bh}" maxlength="100" />
      </td>
      <td class="TableData" width="120" valign="bottom" >姓名：</td>
      <td class="TableData" valign="bottom">
      <input name="xm" type="text" id="xm" class="SmallInput" value="${ryzl.xm}" maxlength="100" />
      </td>
      <td class="TableData" width="120"  valign="bottom" >性别：</td>
        <td valign="bottom">
        <input type="radio" name="xb" checked id="xb" value="0" <c:if test="${ryzl.xb =='0'}"> checked</c:if> />
       全部
        <input name="xb" type="radio" id="xb" value="男" <c:if test="${ryzl.xb =='男'}"> checked</c:if> />
        男 
          <input type="radio" name="xb" id="xb" value="女" <c:if test="${ryzl.xb =='女'}"> checked</c:if> />
        女
        </td>	
    </tr>
      <tr>
        <td class="TableData" valign="bottom">婚姻状况：</td>
        <td class="TableData" valign="bottom">
        <select name="hyzk" id="hyzk" style="width: 65%">
        <option value="">请选择</option>
        <option value="未婚" <c:if test="${ryzl.hyzk=='未婚'}"> selected</c:if>>未婚</option>
        <option value="已婚" <c:if test="${ryzl.hyzk=='已婚'}"> selected</c:if>>已婚</option>
        <option value="离婚" <c:if test="${ryzl.hyzk=='离婚'}"> selected</c:if>>离婚</option>
        <option value="丧偶" <c:if test="${ryzl.hyzk=='丧偶'}"> selected</c:if>>丧偶</option>
        </select>        </td>
		<td class="TableData" valign="bottom">民族：</td>
        <td class="TableData" valign="bottom"><select name="mz" id="mz" style="width: 60%">
          <option value="">请选择</option>
          <option value="汉族" <c:if test="${ryzl.mz=='汉族'}"> selected</c:if>>汉族</option>
          <option value="回族" <c:if test="${ryzl.mz=='回族'}"> selected</c:if>>回族</option>
          <option value="其它" <c:if test="${ryzl.mz=='其它'}"> selected</c:if>>其它</option>
        </select></td>
        <td class="TableData" valign="bottom">政治面貌：</td>
        <td class="TableData"><select name="zzmm" id="zzmm" style="width: 65%">
          <option value="">请选择</option>
          <option value="群众" <c:if test="${ryzl.zzmm=='群众'}"> selected</c:if>>群众</option>
          <option value="党员" <c:if test="${ryzl.zzmm=='党员'}"> selected</c:if>>党员</option>
          <option value="团员" <c:if test="${ryzl.zzmm=='团员'}"> selected</c:if>>团员</option>
        </select></td>
      </tr>
      <tr>
        <td class="TableData" valign="middle">出生日期：</td>
        <td class="TableData" >
        <input name="csrq" type="text" class="SmallInput" id="csrq" value="${ryzl.csrqString}" maxlength="100" onFocus="WdatePicker()">至
        <input name="csrq2" type="text" class="SmallInput" id="csrq2" value="${csrq2}" maxlength="100" onFocus="WdatePicker()">
        </td>
        <td class="TableData" valign="middle">参加工作日期：  </td>
        <td class="TableData" >
        <input name="cjgzrq" type="text" class="SmallInput" id="cjgzrq"  value="${ryzl.cjgzrqString}" maxlength="100" onFocus="WdatePicker()" />
          至
        <input name="cjgzrq2" type="text" class="SmallInput" id="cjgzrq2"  value="${cjgzrq2}" maxlength="100" onFocus="WdatePicker()" />
        </td>
		<td class="TableData" valign="middle">
		  参加计生工作日期：
		</td>
        <td class="TableData">
           <input name="cjjsgzrq" type="text" class="SmallInput" id="cjjsgzrq" value="${ryzl.cjjsgzrqString}" maxlength="100" onFocus="WdatePicker()">
           至
           <input name="cjjsgzrq2" type="text" class="SmallInput" id="cjjsgzrq2" value="${cjjsgzrq2}" maxlength="100" onFocus="WdatePicker()">
        </td>
      </tr>
      <tr>
        
        <td class="TableData" valign="top" nowrap="nowrap">学历：</td>
        <td class="TableData" ><select name="xl" id="xl" style="width: 65%">
           <option value="">请选择</option>
          <option value="初中" <c:if test="${ryzl.xl=='初中'}"> selected</c:if>>初中</option>
          <option value="高中" <c:if test="${ryzl.xl=='高中'}"> selected</c:if>>高中</option>
          <option value="中专" <c:if test="${ryzl.xl=='中专'}"> selected</c:if>>中专</option>
          <option value="大专" <c:if test="${ryzl.xl=='大专'}"> selected</c:if>>大专</option>
          <option value="本科" <c:if test="${ryzl.xl=='本科'}"> selected</c:if>>本科</option>
          <option value="研究生" <c:if test="${ryzl.xl=='研究生'}"> selected</c:if>>研究生</option>
          <option value="博士" <c:if test="${ryzl.xl=='博士'}"> selected</c:if>>博士</option>
          <option value="硕士" <c:if test="${ryzl.xl=='硕士'}"> selected</c:if>>硕士</option>
        </select></td>
		<td class="TableData" valign="bottom">毕业院校：</td>
        <td class="TableData"><input name="byyx" type="text" class="SmallInput" id="byyx" value="${ryzl.byyx}" maxlength="100"></td>
        <td class="TableData" valign="bottom">专业：</td>
        <td class="TableData"><input name="zy" type="text" class="SmallInput" id="zy"  value="${ryzl.zy}" maxlength="100"></td>
      </tr>
      <tr>
        <td class="TableData" valign="bottom">联系地址：</td>
        <td class="TableData"><input name="lxdz" type="text" class="SmallInput" id="lxdz"  value="${ryzl.lxdz}" maxlength="100"></td>
        <td class="TableData">离职时间：</td>
        <td class="TableData"><input name="lzsj" type="text" class="SmallInput" id="lzsj" value="${ryzl.lzsjString}" maxlength="100" onFocus="WdatePicker()"></td>
		<td class="TableData">身份证号：</td>
        <td class="TableData" ><input name="sfzh" type="text" class="SmallInput" id="sfzh" value="${ryzl.sfzh}" maxlength="100" ></td>
      </tr>
      <tr>
        <td class="TableData">人员属性：</td>
        <td class="TableData"><select name="rysx" id="rysx" style="width: 70%">
          <option value="">请选择</option>
          <option value="乡专干*" <c:if test="${ryzl.rysx=='乡专干*'}"> selected</c:if>>乡专干县派</option>
          <option value="乡专干+" <c:if test="${ryzl.rysx=='乡专干+'}"> selected</c:if>>乡专干乡聘</option>
          <option value="村专干" <c:if test="${ryzl.rysx=='村专干'}"> selected</c:if>>村专干</option>
          <option value="村/社区育龄妇女小组长" <c:if test="${ryzl.rysx=='村/社区育龄妇女小组长'}"> selected</c:if>>村/社区育龄妇女小组长</option>
        </select></td>

        
		  <td class="TableData">职务：</td>
        <td class="TableData">  
             <select name="zwbh" id="zwbh" style="width: 60%">
             <option value="">请选择</option>
            <c:forEach items="${zwList}" var="zw">
            <option value="${zw.id}" <c:if test="${ryzl.zdByZwbh.id==zw.id}"> selected</c:if>>${zw.typename}</option>
           </c:forEach>
          </select></td>　　
          <td class="TableData">职称：</td>
          <td class="TableData">
          <select name="zcbh" id="zcbh" style="width: 65%">
          <option value="">请选择</option>
            <c:forEach items="${zcList}" var="zc">
            <option value="${zc.id}" <c:if test="${ryzl.zdByZcbh.id==zc.id}"> selected</c:if>>${zc.typename}</option>
           </c:forEach>
          </select></td>
      </tr>
    
      <tr>
         <td class="TableData">籍贯：</td>
        <td class="TableData"><input name="jg" type="text" class="SmallInput" id="jg" value="${ryzl.jg}" maxlength="100"></td>
        
        <td class="TableData">合同期限：</td>
        <td class="TableData">
        <input name="htqx" class="SmallInput" type="text"  id="htqx"  value="${ryzl.htqxString}" maxlength="100" onFocus="WdatePicker()" />
          至
          <input name="htqx2" class="SmallInput" type="text"  id="htqx2"  value="${ryzl.htqx2String}" maxlength="100" onFocus="WdatePicker()"></td>
		  <td class="TableData">工作状态：</td>
        <td class="TableData">
          <select name="gzzt" id="gzzt" style="width: 65%">
              <option value="">请选择</option>
              <option value="在职" <c:if test="${ryzl.gzzt=='在职'}"> selected</c:if>>在职</option>
              <option value="离职" <c:if test="${ryzl.gzzt=='离职'}"> selected</c:if>>离职</option>
              <option value="退休" <c:if test="${ryzl.gzzt=='退休'}"> selected</c:if>>退休</option>
          </select>
        </td>
      </tr>
       <%if((dlyh.getZd().getTypename().endsWith("市")&&dlyh.getZd().getParentid().equals(745))||dlyh.getZd().getTypename().equals("河北省")){ %>
       <tr style="display: none" ><!-- style="display: none" -->
        <td class="TableData" >部门：</td>
        <td class="TableData" colspan="4">
         <select disabled="disabled" id="sheng" name="sheng" >
           <option value="河北省">河北省</option>
        </select>市
        <select id="shi" name="shi" onchange="shichange(this.value)">
           <option>请选择市</option>
           <%List xianlist=(List) request.getSession().getAttribute("shilist"); 
            for(int i=0;i<xianlist.size();i++){%>
           <option value="<%=((Zd)xianlist.get(i)).getId() %>"><%=((Zd)xianlist.get(i)).getTypename() %></option>
           <%} %>
        </select>市
        <select id="xian" name="xian" onchange="xianchange(this.value)">
           <option>请选择县</option>
        </select>县
        <select id="xiang"  name="xiang" onchange="xiangchange(this.value)" >
         <option >请选择乡</option>
        </select>乡
        <select id="cun"  name="cun" >
        <option >请选择村</option>
        </select>村
       <!--  <input type="text" value="${ryzl.zdByBmbh.zdqc }" disabled="disabled" class="SmallInput" id="bm" name="bm" onClick="openwindow(1)"></input> 
        <a href="javascript:openwindow(1);">选择</a>
        <input type="hidden" value="${ryzl.zdByBmbh.id }" id ="bmbh" name="bmbh"  />-->
          </td>
    </tr>
    <tr>
       <td class="TableData" align="right" colspan="6">
        <input id="btn_submit" onClick="document.getElementById('sid').value=0" value="查询" class="BigButtonB"  type="submit" />&nbsp;&nbsp;
        </td>
    </tr> 
    <%}else{ %>
      <tr >
        <td class="TableData" >部门：</td>
        <td class="TableData" colspan="4">
         <select disabled="disabled" id="sheng" name="sheng" >
           <option value="河北省">河北省</option>
        </select>省
        <select id="shi" name="shi" onchange="shichange(this.value)">
           <option>请选择市</option>
           <%List xianlist=(List) request.getSession().getAttribute("shilist"); 
            for(int i=0;i<xianlist.size();i++){%>
           <option value="<%=((Zd)xianlist.get(i)).getId() %>"><%=((Zd)xianlist.get(i)).getTypename() %></option>
           <%} %>
        </select>市
        <select id="xian" name="xian" onchange="xianchange(this.value)">
           <option>请选择县</option>
        </select>县
        <select id="xiang"  name="xiang" onchange="xiangchange(this.value)" >
         <option >请选择乡</option>
        </select>乡
        <select id="cun"  name="cun" >
        <option >请选择村</option>
        </select>村
          </td>
          <td class="TableData" align="right" >
        <input id="btn_submit" onClick="document.getElementById('sid').value=0" value="查询" class="BigButtonB"  type="submit" />&nbsp;&nbsp;
        </td> 
    </tr>
    <%} %>
  </tbody></table>
  </fieldset>
 </form>
  
  <table class="TableTop" width="100%">
  <tbody><tr>
      <td class="left"></td>
      <td class="center subject">
         人员资料　${fn:length(list)}条数据</td>
      <td class="right"></td>
   </tr>
</tbody></table>

  <pg:pager url="searchList.do" index="half-full" maxPageItems = "10" 
  maxIndexPages="10" isOffset = "<%=false%>" 
  export = "pageOffset,currentPageNumber=pageNumber" 
  scope = "request">
  <pg:param name="zcbh"  value="${zcbh}" />
  <!--<pg:param name="bmbh"  value="${bmbh}" />-->
  <pg:param name="zwbh"  value="${zwbh}" />
  <pg:param name="bh"  value="${bh}" />
  <pg:param name="xm"  value="${xm}" />
  <pg:param name="xb"  value="${xb}" />
  <pg:param name="xl"  value="${xl}" />
   <pg:param name="csrq2"  value="${csrq2}" />
  <pg:param name="hyzk"  value="${hyzk}" />
  <pg:param name="csrq"  value="${csrq}" />
  <pg:param name="cjgzrq"  value="${cjgzrq}" />
  <pg:param name="cjjsgzrq"  value="${cjjsgzrq}" />
  <pg:param name="mz"  value="${mz}" />
  <pg:param name="jg"  value="${jg}" />
  <pg:param name="zzmm"  value="${zzmm}" />
  <pg:param name="cjgzrq2" value="${cjgzrq2}"/>
  <pg:param name="cjjsgzrq2" value="${cjjsgzrq2}" />
  <pg:param name="byyx"  value="${byyx}" />
  <pg:param name="zy"  value="${zy}" />
  <pg:param name="lxdz"  value="${lxdz}" />
  <pg:param name="lzsj"  value="${lzsj}" />
  <pg:param name="sfzh"  value="${sfzh}" />
  <pg:param name="rysx"  value="${rysx}" />
  <pg:param name="htqx"  value="${htqx}" />
  <pg:param name="htqx2"  value="${htqx2}" />
  <pg:param name="gzzt"  value="${gzzt}" />
  
    <pg:param name="shi"  value="${shi}" />
  <pg:param name="xian"  value="${xian}" />
  <pg:param name="xiang"  value="${xiang}" />
  <pg:param name="cun"  value="${cun}" />
  <pg:param name="xianzhi"  value="${xianzhi}" />
  <pg:param name="xiangzhi"  value="${xiangzhi}" />
  <pg:param name="cunzhi"  value="${cunzhi}" />
    <pg:param name="cs" value="${bmmc}"/>
  <pg:param name="sname" value="${bmname}"/>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class=" TableBlock no-top-border">
<thead>
  <tr class="title_text">
    <td  align="center" class="TableData">编号</td>
    <td  align="center" class="TableData" >姓名</td>
    <td  align="center" class="TableData">性别</td>
    <td  align="center" class="TableData">出生日期</td>
    <td  align="center" class="TableData">参加工作日期</td>
    <td  align="center" class="TableData">参加计生工作日期</td>
    <td  align="center" class="TableData">政治面貌</td>
    <td  align="center" class="TableData">学历</td>
    <td align="center" class="TableData">操作</td>
    </tr>
  </thead>
  <TBODY >
  <c:set var="bb" value="yfxm" />
  <c:forEach var="l" items="${list}">
  <pg:item>
  <tr>
    <td  align="center" class="TableData">${l.bh}</td>
    <td  align="center" class="TableData">${l.xm}</td>
    <td  align="center" class="TableData">${l.xb}</td>
    <td  align="center" class="TableData">${l.csrqString} </td>
    <td  align="center" class="TableData">${l.cjgzrqString}</td>
    <td align="center" class="TableData">${l.cjjsgzrqString}</td>
    <td  align="center" class="TableData">${l.zzmm}</td>
    <td  align="center" class="TableData">${l.xl}</td>
    <td  align="center" class="TableData">
      <a href="ryzlInfo.do?id=${l.id }">详细信息</a>
    </td>
    </tr>
  </pg:item>
  </c:forEach>
  </TBODY>
</table>
<pg:index>
    <center>
    <table border=0 cellpadding=5  cellspacing=0 style="font-size:12px">
    <tr align=center valign=top>
    <td valign=bottom></td>
    <pg:prev ifnull="true">
      <% if (pageUrl != null) { %>
        <td align=right><A HREF="<%=pageUrl%>&sid=&pageNo=<%=pageNumber%>&state=searchall">上一页<br />
        </A></td>
      <% } else { %>
        <td>上一页</td>
      <% } %>
    </pg:prev>
    <pg:pages>
      <% if (pageNumber == currentPageNumber) { %>
        <td>
        <font color=#A90A08><%= pageNumber %></font></td>
      <% } else { %>
        <td><A HREF="<%=pageUrl%>&pageNo=<%=pageNumber%>&state=searchall&sid=">
        <%=pageNumber%></A></td>
      <% } %>
    </pg:pages>
    <pg:next ifnull="true">
      <% if (pageUrl != null) { %>
        <td><A HREF="<%=pageUrl%>&pageNo=<%=pageNumber%>&sid=&state=searchall">下一页<br></A></td>
      <% } else { %>
        <td>下一页</td>
      <% } %>
    </pg:next>
    </tr>
    </table>
    </center>
  </pg:index>
  </pg:pager>
  
  </body>
</html>
